package com.zszedu.web.controller;

import com.zszedu.pojo.Recharge;
import com.zszedu.service.RechargeService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("recharge")
public class RechargeController {
    @DubboReference
    private RechargeService rechargeService;

    //查询最近投资信息，根据用户id查询用户最近的投资信息以及投资产品名称
    @GetMapping("recentMoney")
    public List<Recharge> recentMoney(@RequestHeader("uid") Long uid){
        return rechargeService.queryByUid(uid);
    }
}
